#!/bin/sh /etc/rc.common
# Copyright (C) 2010 Jo-Philipp Wich

START=50
STOP=75

start(){
    /bin/mini_httpd -C /tz_www/mini_httpd.conf  &

    https_port=`cfg -g TZ_HTTPS_PORT --section web`
    if [ "${https_port}" = ""]; then
    	/bin/mini_httpd -C /tz_www/mini_httpd_https.conf  &
    else
    	/bin/mini_httpd -C /tz_www/mini_httpd_https.conf  -p ${https_port} &
    fi
    
}

stop(){
    #ps | grep mini_httpd | grep -v grep | cut -d' ' -f 2 | xargs kill -9
    killall -9 mini_httpd
}
